package com.yedean.mall.portal.util;

import java.util.Random;

public class CharUtil {
    /**
     * 获取随机字符串
     */
    public static String getRandomString(Integer num){
        String base="abcdefghijklmnopqrstuvwxyz0123456789";
        Random radom=new Random();
        StringBuffer buffer = new StringBuffer();
        for (int i = 0; i < num; i++) {
            int number=radom.nextInt(base.length());
            buffer.append(base.charAt(number));
        }
        return buffer.toString();

    }
}
